package com.thwj.project.biz.enums;

/***
 * 运营banner banner位置
 */
public enum BannerPositionEnum {

    /***
     * 首页活动
     */
    HOME(1,"首页活动"),
    /**
     * 派队首页
     */
    PARTY_INDEX(2,"派对主页"),

    /**
     * 商家主页
     */
    MERCHANT_INDEX(3,"商家主页"),

    /**
     * 首页弹窗
     */
    HOME_POP(4,"首页弹窗"),
    ;
    BannerPositionEnum(int value, String name){
        this.name = name;
        this.value = value;
    }

    private int value;
    private String name;

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static BannerPositionEnum getEnumByValue(Integer value){
        for (BannerPositionEnum typeEnum : BannerPositionEnum.values()) {
            if(typeEnum.value == value) {
                return typeEnum;
            }
        }
        return null;
    }
}
